- /* sxfsccov.cpp by K.Tsuru */
- // function ID = 512 BRADIX
- // since ver 2.18
-
- /************************************
- Radix conversion SDecimal to SDouble
- using "square coupling" method
- *************************************/
- #ifndef SN_H
- #include "sn.h"
- #endif
-
- /// SLong version ///
- SDouble SC_SDConvToSDouble(const SDecimal& x) {
- const SLong R(BRADIX);
- const fType* pf = x.ReadFigures();
- long p = x.Last();
- SLong *w = new SLong[p]; // work area
-
- for(int i = 0; i < p; i++) w[i].SetShort(pf[i+1]);
- SquareCouplingInverseR<SLong> cv(w, R, p);
-
- delete[] w;
- return (SDouble)cv.getA()/(SDouble)cv.getR() + (SDouble)pf[0]; // add integer part
- }
sxfsccov.cpp : last modifiled at 2017/03/13 14:32:02(673 bytes)
created at 2015/12/22 16:09:56
The creation time of this html file is 2017/10/27 15:45:59 (Fri Oct 27 15:45:59 2017).